<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<script type="text/javascript">
	$(document).ready(function() {
		$("#loggingTable").dataTable({
			"order" : [ [ 1, "desc" ] ]
		});
	});
</script>

<div id="content-outer">
	<h1>Logs Information</h1>
	<table id="loggingTable">
		<thead>
			<tr>
				<th>Log Data</th>
				<th>Date</th>
				<security:authorize ifAnyGranted="ROLE_ADMIN">
					<th>User</th>
				</security:authorize>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="log" items="${logs}" varStatus="loop">
				<tr>
					<td>${log.logData}</td>
					<td>${log.date}</td>
					<security:authorize ifAnyGranted="ROLE_ADMIN">
						<td>${log.user.getLoginId()}</td>
					</security:authorize>

				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="clear">&nbsp;</div>
</div>